package com.beiben.trialproduce.part.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 零件对象 trial_produce_part
 * 
 * @author 熊国强
 * @date 2020-11-25
 */
public class Part extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 零件ID */
    private Long partId;

    private Long[] partIds;

    /** 零部件号 */
    @Excel(name = "零部件号(或材料编号或车号)")
    private String code;

    /** 零部件名称 */
    @Excel(name = "零部件名称(或材料名称或整车型号)")
    private String name;

    /** 材料品号 */
    @Excel(name = "材料品号")
    private String pinhao;

    /** 规格型号 */
    @Excel(name = "规格型号")
    private String model;

    /** 计量单位 */
    @Excel(name = "计量单位")
    private String unitName;

    /** 单价 */
    @Excel(name = "单价")
    private BigDecimal price;

    /** 账面数量 */
    @Excel(name = "账面数量")
    private Long partNum;

    /** 现存状态 */
    @Excel(name = "现存状态" ,readConverterExp = "0=旧,1=新")
    private String partState;

    /** 存放地点 */
    @Excel(name = "存放地点")
    private String address;

    @Excel(name = "备注")
    private String remark;

    /** 使用状态 */
    @Excel(name = "使用状态" ,readConverterExp = "0=库存,1=使用,2=报废")
    private String partUseState;

    /** 物资由来 */
    @Excel(name = "物资由来")
    private String derive;

    /** 入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入库时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionTime;

    /** 零件使用履历 */
    @Excel(name = "零件使用履历")
    private String record;

    public void setPartId(Long partId) 
    {
        this.partId = partId;
    }

    public Long getPartId() 
    {
        return partId;
    }

    public Long[] getPartIds() {
        return partIds;
    }

    public void setPartIds(Long[] partIds) {
        this.partIds = partIds;
    }

    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setPinhao(String pinhao) 
    {
        this.pinhao = pinhao;
    }

    public String getPinhao() 
    {
        return pinhao;
    }
    public void setModel(String model) 
    {
        this.model = model;
    }

    public String getModel() 
    {
        return model;
    }
    public void setUnitName(String unitName) 
    {
        this.unitName = unitName;
    }

    public String getUnitName() 
    {
        return unitName;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setPartNum(Long partNum) 
    {
        this.partNum = partNum;
    }

    public Long getPartNum() 
    {
        return partNum;
    }
    public void setPartState(String partState) 
    {
        this.partState = partState;
    }

    public String getPartState() 
    {
        return partState;
    }
    public void setPartUseState(String partUseState) 
    {
        this.partUseState = partUseState;
    }

    public String getPartUseState() 
    {
        return partUseState;
    }
    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }
    public void setDerive(String derive) 
    {
        this.derive = derive;
    }

    public String getDerive() 
    {
        return derive;
    }
    public void setProductionTime(Date productionTime) 
    {
        this.productionTime = productionTime;
    }

    public Date getProductionTime() 
    {
        return productionTime;
    }
    public void setRecord(String record) 
    {
        this.record = record;
    }

    public String getRecord() 
    {
        return record;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("partId", getPartId())
            .append("code", getCode())
            .append("name", getName())
            .append("pinhao", getPinhao())
            .append("model", getModel())
            .append("unitName", getUnitName())
            .append("price", getPrice())
            .append("partNum", getPartNum())
            .append("partState", getPartState())
            .append("partUseState", getPartUseState())
            .append("address", getAddress())
            .append("derive", getDerive())
            .append("productionTime", getProductionTime())
            .append("record", getRecord())
            .append("remark", getRemark())
            .toString();
    }
}
